package com.asynctm.android.common.application;

import java.util.LinkedList;
import java.util.List;

import roboguice.application.RoboApplication;

import com.asynctm.android.tm.dto.ActivityDto;
import com.google.inject.Module;

/**
 * Clase principal de la aplicacion, hace el setup de la configuracion general,
 * e inicializa los modulos de RoboGuice a utilizar
 * 
 * @author rockdrigo
 */
public class AsyncTMApplication extends RoboApplication {
	
	private LinkedList<ActivityDto> activities;
	
	public LinkedList<ActivityDto> getActivities() {
		return activities;
	}
	
	public void setActivities(LinkedList<ActivityDto> activities) {
		this.activities = activities;
	}
	
	public void addActivities(ActivityDto activityDto) {
		this.activities.add(activityDto);
	}
	
	public void removeActivity(int position) {
		this.activities.remove(position);
	}

	@Override
	protected void addApplicationModules(List<Module> modules) {
		super.addApplicationModules(modules);
		modules.add(new AsyncTMGuiceModule());
	}

}
